<%@page contentType="text/html;charset=UTF-8"%>
<%@include file="/common/commonTag.jsp"%>

<html>
	<head>
		<title>添加员工信息</title>
		<meta http-equiv="Content-Type" content="text/html;charset=UTF-8">
		<link rel="stylesheet" href="${path}/css/backsys/ctx.css">
		<script type="text/javascript" src="${path}/js/jquery.js"></script>
		<script language="javascript" type="text/javascript" src="${path}/webutil/DateUtil/WdatePicker.js"></script>
		<script type="text/javascript" src="${path}/js/util/zhtopinyin/zhtopinyin.js"></script>
		<script type="text/javascript">
			function checkExist(val) {
				if(val != "") {
					var url =  "${path}/privilegeEmpJson!checkAccountExist.action" ;
					$.post(url,{"ea.account":val,"d":new Date().getTime()},function(data){
						var d = eval("("+data+")")
						if(d.exist == true) {
							$("#exist").html("<font color=\"red\">该账户已被使用</font>");
							$(".btobg").attr("disabled","disabled");
						} else {
							$("#exist").html("<font color=\"green\">该账户可以正常使用</font>");
							$(".btobg").attr("disabled","");
						}
					});
				}
			}
		</script>
	</head>

	<body>
		<div class="ctx">
		<form action="${path}/oa/hr/emp!regEmployee.action" method="post" enctype="multipart/form-data">
			<table class="ow" width="70%">
				<tr>
					<th height="30" colspan="2" align="left">注册员工</th>
				</tr>
				<tr>
					<td width="100" align="center">员工编号：</td>
					<td><input type="text" size="20" name="emp.empNo"/></td>
					<td width="100" rowspan="5" align="center">
						<br/>近<br/><br/>期<br/><br/>照<br/><br/>片<br/><br/>
					</td>
				</tr>
				<tr>
					<td width="100" align="center">姓&nbsp;&nbsp;&nbsp;&nbsp;名：</td>
					<td><input type="text" size="20" name="emp.empRealname" onblur="ac.innerText=toPinyinOnly(this.value,0)"/></td>
				</tr>
				
				<tr>
					<td width="100" align="center">登录账号：</td>
					<td>
						<input type="text" id="ac" size="20" name="emp.empAccount.account" onblur="checkExist(this.value)"/>
						<span id="exist"></span>
					</td>
				</tr>
				<tr>
					<td width="100" align="center">登录密码：</td>
					<td><input type="text" size="20" name="emp.empAccount.password"/></td>
				</tr>
				<tr>
					<td width="100" align="center">上传图片：</td>
					<td><input type="file" style="height:20px;" size="30" name="fileform.file"/></td>
				</tr>
				<tr>
					<td width="100" align="center">民&nbsp;&nbsp;&nbsp;&nbsp;族：</td>
					<td colspan="2">
						<select name="emp.nation">
							<option value="汉族" selected="selected">汉族</option>
						</select>
					</td>
				</tr>
				<tr>
					<td width="100" align="center">性&nbsp;&nbsp;&nbsp;&nbsp;别：</td>
					<td colspan="2">
						<select name="emp.gender">
							<option value="MAN" selected="selected">男</option>
							<option value="WOMAN">女</option>
						</select>
					</td>
				</tr>
				<tr>
					<td width="100" align="center">籍&nbsp;&nbsp;&nbsp;&nbsp;贯：</td>
					<td colspan="2">
						<select name="emp.natives">
							<option selected="selected">请选择</option>
							<option value="广东">广东</option>
						</select>
					</td>
				</tr>
				<tr>
					<td width="100" align="center">出生日期：</td>
					<td colspan="2"><input type="text" size="20" name="emp.birthday" class="Wdate" readonly="readonly" onClick="WdatePicker()"/></td>
				</tr>
				<tr>
					<td width="100" align="center">联系电话：</td>
					<td colspan="2"><input type="text" size="20" name="emp.tel"/></td>
				</tr>
				<tr>
					<td width="100" align="center">移动电话：</td>
					<td colspan="2"><input type="text" size="20" name="emp.mobileTel"/></td>
				</tr>
				<tr>
					<td width="100" align="center">电子邮件：</td>
					<td colspan="2"><input type="text" size="20" name="emp.email"/></td>
				</tr>
				<tr>
					<td width="100" align="center">应聘部门：</td>
					<td colspan="2"><input type="text" size="20" name="emp.acceptDept"/></td>
				</tr>
				<tr>
					<td width="100" align="center">应聘职位：</td>
					<td colspan="2"><input type="text" size="20" name="emp.acceptJob"/></td>
				</tr>
				<tr>
					<td width="100" align="center">工作年限：</td>
					<td colspan="2"><input type="text" size="20" name="emp.ageJob"/></td>
				</tr>
				
				<tr>
					<td width="100" align="center">入职日期：</td>
					<td colspan="2"><input type="text" size="20" name="emp.appointmentDate" class="Wdate" readonly="readonly" onClick="WdatePicker()"/></td>
				</tr>
				
				<tr>
					<td width="100" align="center">文化程度：</td>
					<td colspan="2"><input type="text" size="20" name="emp.educational"/></td>
				</tr>
				<tr>
					<td width="100" align="center">专&nbsp;&nbsp;&nbsp;&nbsp;业：</td>
					<td colspan="2"><input type="text" size="20" name="emp.speciality"/></td>
				</tr>
				
				<tr>
					<td width="100" align="center">毕业学校：</td>
					<td colspan="2"><input type="text" size="52" name="emp.school"/></td>
				</tr>
				<tr>
					<td width="100" align="center">户口所在地：</td>
					<td colspan="2"><input type="text" size="52" name="emp.residence"/></td>
				</tr>
				<tr>
					<td width="100" align="center">现居住地址：</td>
					<td colspan="2"><input type="text" size="52" name="emp.residentialAddr"/></td>
				</tr>
				<tr>
					<td width="100" align="center">紧急联系人：</td>
					<td colspan="2"><input type="text" size="52" name="emp.emergency"/></td>
				</tr>
				<tr>
					<td width="100" align="center">紧急联系电话：</td>
					<td colspan="2"><input type="text" size="52" name="emp.emergencyTel"/></td>
				</tr>
				<tr>
					<td colspan="3" align="center">
						<input type="hidden" value="${empform.deptNo}" name="emp.department.deptNo"/>
						<input type="submit" class="btobg" value="添加员工"/>
					</td>
				</tr>
			</table>
		</form>
		</div>
	</body>
</html>
